package com.floreo.shopping.service;

import com.floreo.shopping.service.impl.ProductService;
import com.floreo.shopping.service.impl.QuantityService;
import com.floreo.shopping.service.impl.ShoppingListService;

/**
 * @author merzod
 */
public class ServiceFactory {
    private static ServiceFactory instance = new ServiceFactory();
    private IProductService productService;
    private IQuantityService quantityService;
    private IShoppingListService shoppingListService;

    private ServiceFactory() {
        productService = new ProductService();
        quantityService = new QuantityService();
        shoppingListService = new ShoppingListService();
    }

    public static ServiceFactory getInstance() {
        return instance;
    }

    public IProductService getProductService() {
        return productService;
    }

    public IQuantityService getQuantityService() {
        return quantityService;
    }

    public IShoppingListService getShoppingListService() {
        return shoppingListService;
    }
}
